{template header}

<div class="midder">
<div class="mc">

<div class="bbox">
<div class="bc onecate">
<ul>
<li><a href="{tsUrl('study')}">首页</a></li>
{loop $arrOneCate $key $item}
<li>
<a {if $item['cateid']==$strStudy['cateid']}class="select"{/if} href="{tsUrl('study','cate',array('id'=>$item['cateid']))}"> {$item['catename']}</a>
</li>
{/loop}
<li class="create"><a href="{tsUrl('study','create')}">创建课程</a></li>
</ul>
</div>
</div>

<div class="twocate">
<h1><a href="{tsUrl('study','cate',array('id'=>$oneCate['cateid']))}">{$oneCate['catename']}</a></h1>
<ul class="channel-nav">
{loop $arrTwoCate $key $item}
<li><a href="{tsUrl('study','cate',array('id'=>$item['cateid']))}" >{$item[catename]}</a></li>
{/loop}
</ul>
</div> 

<div class="cleft">


<div class="bbox">
<div class="bc">
<div class="kcinfo"> 
<div class="photo">
<a href="{tsUrl('study','show',array('id'=>$strStudy['studyid']))}"><img src="{$strStudy['photo']}" alt="{$strStudy['studyname']}" class="pic1 fl" /></a>
</div>


<div class="info">
<h1>
<a href="{tsUrl('study','show',array('id'=>$strStudy['studyid']))}">{$strStudy[studyname]}</a>          
</h1>

<div class="other">

<div class="price">价格：<i>￥{$strStudy['price']}</i></div>

课时：<span>{$strStudy['count_lesson']} 课</span>
<br />
学员：<span>{$strStudy['count_learn']} 人</span>
<br />
浏览：<span>{$strStudy['count_view']} 次</span>
</div>
</div>

<div class="learnbtn">

{if $strStudy['learn']}

{if $strStudy['learn']['status']==2}
已学完	
{/if}
{if $strStudy['learn']['status']==1}
已学{$strStudy['learn']['count_lesson']}课时
{/if}

{else}
<a class="btn btn-large btn-success" href="javascript:void('0');" onclick="studyLearn('{$strStudy['studyid']}');">购买学习</a>
{/if}
</div>

<div class="clear"></div>

<div style="margin-bottom:0px" class="pills">
<a class="on" href="{tsUrl('study','show',array('id'=>$strStudy[studyid]))}">课时</a>
{if $strStudy['userid']==$TS_USER['userid']  || $TS_USER['isadmin']==1}
<a href="{tsUrl('study','edit',array('ts'=>'base','studyid'=>$strStudy['studyid']))}">管理</a>
<a href="{tsUrl('study','add',array('id'=>$strStudy[studyid]))}">添加新课时</a>
{/if}
</div>

</div>
</div>
</div>



<div class="bbox">
<div class="bc">
<div class="lesson_show">
<h1><span class="lesson-index">L{$strLesson['orderid']}</span>
<span class="lesson-title">{$strLesson['title']}</span></h1>
<div class="content">	
{$strLesson[content]}
</div>

<div class="tar">
{if $isLessonUser}
已学完本课时
{else}
<a href="javascript:void('0');" onclick="lessonDo('{$strLesson['lessonid']}','$strStudy['studyid']');" class="btn btn-success" id="learn-btn" ><i class="icon-ok icon-white"></i> 我学完了</a>  
{/if}
</div>

<div class="around-nav tar">
{if $upTopic}上一课时：<a  class="prev mrs" href="{tsUrl('study','topic',array('id'=>$upTopic['topicid']))}">{$upTopic['title']}</a>{/if}
{if $downTopic}下一课时：<a class="next" href="{tsUrl('study','topic',array('id'=>$downTopic['topicid']))}">{$downTopic['title']}</a>{/if}
</div> 
</div>  
</div>  
</div>  

<div class="clear"></div>



<div class="bbox">
<h2>最近学完的人</h2>

<div class="bc">
{if $arrLessonUser}
<div class="facelist">
<ul >
{loop $arrLessonUser $key $item}

<li>
<a href="{tsUrl('user','topic',array('id'=>$item[userid]))}" ><img src="{$item['face']}" alt="{$item['username']}" width="48" height="48" /></a>
<div><a href="{tsUrl('user','topic',array('id'=>$item['userid']))}" title="{$item['username']}">{$item['username']}</a></div>
</li>
{/loop}
</ul>
</div>
{else}
<p class="empty-list">还没有人学完此课程!</p>
{/if}

</div>
</div>




</div>


<div class="cright">

<div class="bbox lesson-nav">
<h2>课时列表</h2>
<ul class="bc">
{loop $arrLesson $key $item}
<li 
{if $strLesson['lessonid']==$item['lessonid']}class=" current"{/if}><span class="lesson-index">L{$item['orderid']}</span>
<span class="lesson-title"><a href="{tsUrl('study','lesson',array('id'=>$item['lessonid']))}">{php echo getsubstrutf8($item['title'],0,16,false)}</a></span>
</li>                                      
{/loop}
</ul>
</div>





</div>



</div>
</div>
{template footer}